package cn.cau.epidemicsurveysystem.dao;

import cn.cau.epidemicsurveysystem.bean.KnowledgeBean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface KnowledgeRepository extends JpaRepository<KnowledgeBean,Integer> {

    @Query(value = "select * from knowledge", nativeQuery = true)
    List<KnowledgeBean> findALl();

    KnowledgeBean findKnowledgeBeanByKnowledgeIdEquals(int knowledgeId);
}
